home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-03-19 | 2.0 KB | 40 lines | [TEXT/MMCC] |
- //------------------------------------------------------------------------------
- // File: tabstop.cp
- // Date: 9/19/94
- // Author: Bretton Wade
- //
- // Description: this file contains the class methods for a tabstop widget.
- // a tabstop widget is a widget that can be reached by tabbing.
- //
- //------------------------------------------------------------------------------
-
- #include "tabstop.h"
- #include "colors.h"
-
- //------------------------------------------------------------------------------
- // frame the widget in the hilite color
- //------------------------------------------------------------------------------
- void tabstop::Hilite (bool hilite) // tell the widget to hilite or unhilite itself
- { // begin
- if (hilite) // if hilite is true
- RGBForeColor (&HILITE_COLOR); // use the hilite color
- else // otherwise
- {
- RGBBackColor (&BLACK); // be sure it draws right in black and white
- RGBForeColor (&GREY); // use the background color
- }
- Rect h = (*region)->rgnBBox; // get the bounding box of the widget
- InsetRect (&h, -1, -1); // expand it by 1
- FrameRect (&h); // draw the hilite rectangle
- InsetRect (&h, -1, -1); // expand it by 1
- FrameRect (&h); // draw the hilite rectangle
- /*
- InsetRect (&h, 2, 2); // expand it by 1
- FrameRect (&h); // draw the hilite rectangle
- */
- RGBForeColor (&BLACK); // reset the foreground color
- RGBBackColor (&WHITE); // reset the background color
- } // end
-
- //------------------------------------------------------------------------------
-